﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLL;
using Models;
namespace Web
{
    public partial class rss : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            BindNews();
        }
        private void BindNews()
        {
            List<NewsInfo> newslist = NewsInfoLogic.GetAllNewsInfo(100, 1);
            foreach (var news in newslist)
            {
                news.CategoryName = "1"; //NewsCategoryInfoLogic.GetOneNewsCategoryInfo(news.CategoryID).CategoryName;
                news.NewsContent = news.NewsContent.Replace("src=\"", "src=\"http://www.chingedesign.com");
            }
            rptRSS.DataSource = newslist;
            rptRSS.DataBind();
        }
    }
}
